Ubuntu20.04下的gnuradio 3.10.5.1环境搭建

您所在的位置:网站首页 gnu radio windows 无法启动hackrf Ubuntu20.04下的gnuradio 3.10.5.1环境搭建

Ubuntu20.04下的gnuradio 3.10.5.1环境搭建

2023-04-01 20:04| 来源: 网络整理| 查看: 265

使用vmware的典型安装模式安装Ubuntu20.04

自动安装了常用软件和虚拟机增强工具,屏幕分辨率也自动设置并拉伸,比较方便。

安装gnuradio的命令

参考资料: https://wiki.gnuradio.org/index.php?title=InstallingGR https://wiki.gnuradio.org/index.php?title=LinuxInstall https://wiki.gnuradio.org/index.php?title=LinuxInstall#Ubuntu_PPA_Installation

Quick Start

Ubuntu 20.04 gnuradio v3.10.5.1

sudo add-apt-repository ppa:gnuradio/gnuradio-releases sudo apt-get update sudo apt-get install gnuradio python3-packaging Ubuntu PPA的安装

对于Ubuntu,最新的构建(包括发布的和从主分支拉出的)都以PPA的形式在launchpad上维护。 请务必先卸载之前安装的gnuradio版本。参见UnInstallGR。 要访问当前的发布版本(3.10),请添加gnuradio/gnuradio-releases ppa(如果已经配置了其他gnuradio的ppas,请删除)。

sudo add-apt-repository ppa:gnuradio/gnuradio-releases

要访问3.9发布版本,请添加gnuradio/gnuradio-releases-3.9 ppa(如果已经配置了其他gnuradio的ppas,请删除)。

sudo add-apt-repository ppa:gnuradio/gnuradio-releases-3.9

要访问3.8发布版本,请添加gnuradio/gnuradio-releases-3.8 ppa(如果已经配置了其他gnuradio的ppas,请删除)。

sudo add-apt-repository ppa:gnuradio/gnuradio-releases-3.8

要访问3.7发布版本(遗留),请添加gnuradio/gnuradio-releases-3.7 ppa(如果已经配置了其他gnuradio ppas,请删除)。

sudo add-apt-repository ppa:gnuradio/gnuradio-releases-3.7

然后,更新apt源,并安装gnuradio

sudo apt-get update sudo apt install gnuradio

注意。不要试图通过Ubuntu的软件包管理(即使用 “apt”)来安装更多的软件包,如gr-osmosdr。Ubuntu将尝试安装一个可能不兼容的版本,你的系统将处于未定义状态。 相反,请首先打开GNURadio-Companion,在右侧的块状列表中,打开 “Soapy”->"Source "或 “Sink”,看看你最可能使用的硬件是否已经被集成。 关于3.10包装依赖性的说明 对于某些发行版,你可能需要用pip安装python模块 “packaging”(可能还需要安装)。

sudo apt install python3-pip pip install packaging Ubuntu上的Modtool

注意:在Ubuntu 18.04 (bionic)的发布版本中,在GNU Radio从PPA中安装后,使用gr_modtool有一个问题。这是由于安装后modtool模板中仍有字节编译的代码。为了解决这个问题。

cd /usr/share/gnuradio/modtool/templates/gr-newmod sudo py3clean .

这个问题不会出现在Ubuntu 19及以后的软件包中

=========================================

安装完成后打开还是没有osmosdr的source,需要手工安装 git clone git://git.osmocom.org/gr-osmosdr cd gr-osmosdr/ mkdir build cd build/ cmake ../ make sudo make install sudo ldconfig cmake log $ cmake ../ -- The CXX compiler identification is GNU 9.4.0 -- The C compiler identification is GNU 9.4.0 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Build type not specified: defaulting to release. -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Checking for module 'gmp' -- Found gmp, version 6.2.0 -- Found GMP: /usr/lib/x86_64-linux-gnu/libgmpxx.so -- Using GMP. -- Found MPLIB: /usr/lib/x86_64-linux-gnu/libgmpxx.so -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.71.0") found components: date_time program_options system regex thread unit_test_framework -- Found Volk: Volk::volk -- User set python executable /usr/bin/python3 -- Found PythonInterp: /usr/bin/python3 (found version "3.8.10") -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found suitable exact version "3.8.10") -- Found Git: /usr/bin/git -- Extracting version information from git describe... -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.65") found components: chrono thread system -- -- The build system will automatically enable all components. -- Use -DENABLE_DEFAULT=OFF to disable components by default. -- Searching for GNURadio-Blocks... -- Found GNURadio-Blocks: 1 -- Searching for IQ Balance... -- Could NOT find gnuradio-iqbalance (missing: gnuradio-iqbalance_DIR) -- Found IQ Balance: 0 -- Searching for UHD Drivers... -- Checking for module 'uhd' -- No package 'uhd' found -- Found UHD Driver: 0 -- Searching for UHD Block... -- Found UHD Block: 1 -- Searching for Volk... -- Found Volk: 1 -- Checking for module 'librtlsdr' -- No package 'librtlsdr' found -- librtlsdr not found. -- Checking for module 'libmirisdr' -- No package 'libmirisdr' found -- libmirisdr not found. -- Checking for module 'libhackrf' -- No package 'libhackrf' found -- Could NOT find LibHackRF (missing: LIBHACKRF_LIBRARIES LIBHACKRF_INCLUDE_DIRS) -- Checking for module 'libairspy' -- No package 'libairspy' found -- Could NOT find LibAIRSPY (missing: LIBAIRSPY_LIBRARIES LIBAIRSPY_INCLUDE_DIRS) -- Checking for module 'libairspyhf' -- No package 'libairspyhf' found -- Could NOT find LibAIRSPYHF (missing: LIBAIRSPYHF_LIBRARIES LIBAIRSPYHF_INCLUDE_DIRS) -- Checking for module 'libbladeRF' -- No package 'libbladeRF' found -- libbladeRF not found. -- Checking for module 'libgnuradio-funcube' -- No package 'libgnuradio-funcube' found -- gnuradio-funcube not found. -- Could NOT find SoapySDR (missing: SoapySDR_DIR) -- Checking for module 'libfreesrp' -- No package 'libfreesrp' found -- libfreesrp not found. -- Checking for module 'libxtrx' -- No package 'libxtrx' found -- libxtrx not found. -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found suitable version "3.8.10", minimum required is "3") -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so -- -- Configuring Python support support... -- Dependency PYTHONLIBS_FOUND = TRUE -- Dependency pybind11_FOUND = 1 -- Enabling Python support support. -- Override with -DENABLE_PYTHON=ON/OFF -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- -- Configuring high resolution timing... -- Performing Test HAVE_CLOCK_GETTIME -- Performing Test HAVE_CLOCK_GETTIME - Success -- Performing Test HAVE_MACH_ABSOLUTE_TIME -- Performing Test HAVE_MACH_ABSOLUTE_TIME - Failed -- Performing Test HAVE_QUERY_PERFORMANCE_COUNTER -- Performing Test HAVE_QUERY_PERFORMANCE_COUNTER - Failed -- High resolution timing supported through clock_gettime. -- -- Configuring Osmocom IQ Imbalance Correction support... -- Dependency gnuradio-iqbalance_FOUND = 0 -- Disabling Osmocom IQ Imbalance Correction support. -- Override with -DENABLE_IQBALANCE=ON/OFF -- -- Configuring FUNcube Dongle support... -- Dependency GNURADIO_FUNCUBE_FOUND = FALSE -- Disabling FUNcube Dongle support. -- Override with -DENABLE_FCD=ON/OFF -- -- Configuring IQ File Source & Sink support... -- Dependency gnuradio-blocks_FOUND = 1 -- Enabling IQ File Source & Sink support. -- Override with -DENABLE_FILE=ON/OFF -- -- -- Configuring Osmocom RTLSDR support... -- Dependency LIBRTLSDR_FOUND = FALSE -- Disabling Osmocom RTLSDR support. -- Override with -DENABLE_RTL=ON/OFF -- -- Configuring RTLSDR TCP Client support... -- Dependency gnuradio-blocks_FOUND = 1 -- Enabling RTLSDR TCP Client support. -- Override with -DENABLE_RTL_TCP=ON/OFF -- -- Configuring Ettus USRP Devices support... -- Dependency UHD_FOUND = 0 -- Dependency gnuradio-uhd_FOUND = 1 -- Disabling Ettus USRP Devices support. -- Override with -DENABLE_UHD=ON/OFF -- -- Configuring Osmocom MiriSDR support... -- Dependency LIBMIRISDR_FOUND = FALSE -- Disabling Osmocom MiriSDR support. -- Override with -DENABLE_MIRI=ON/OFF -- -- Configuring HackRF & rad1o Badge support... -- Dependency LIBHACKRF_FOUND = FALSE -- Disabling HackRF & rad1o Badge support. -- Override with -DENABLE_HACKRF=ON/OFF -- -- Configuring nuand bladeRF support... -- Dependency LIBBLADERF_FOUND = FALSE -- Disabling nuand bladeRF support. -- Override with -DENABLE_BLADERF=ON/OFF -- -- Configuring RFSPACE Receivers support... -- Enabling RFSPACE Receivers support. -- Override with -DENABLE_RFSPACE=ON/OFF -- -- Configuring AIRSPY Receiver support... -- Dependency LIBAIRSPY_FOUND = FALSE -- Disabling AIRSPY Receiver support. -- Override with -DENABLE_AIRSPY=ON/OFF -- -- Configuring AIRSPY HF+ Receiver support... -- Dependency LIBAIRSPYHF_FOUND = FALSE -- Disabling AIRSPY HF+ Receiver support. -- Override with -DENABLE_AIRSPYHF=ON/OFF -- -- Configuring SoapySDR support support... -- Dependency SoapySDR_FOUND = 0 -- Disabling SoapySDR support support. -- Override with -DENABLE_SOAPY=ON/OFF -- -- Configuring Red Pitaya SDR support... -- Enabling Red Pitaya SDR support. -- Override with -DENABLE_REDPITAYA=ON/OFF -- -- Configuring FreeSRP support support... -- Dependency LIBFREESRP_FOUND = FALSE -- Disabling FreeSRP support support. -- Override with -DENABLE_FREESRP=ON/OFF -- -- Configuring XTRX SDR support... -- Dependency LIBXTRX_FOUND = FALSE -- Disabling XTRX SDR support. -- Override with -DENABLE_XTRX=ON/OFF -- Python checking for pygccxml - found -- Performing Test HAS_FLTO -- Performing Test HAS_FLTO - Success -- LTO enabled -- -- ###################################################### -- # Gnuradio enabled components -- ###################################################### -- * Python support -- * IQ File Source & Sink -- * RTLSDR TCP Client -- * RFSPACE Receivers -- * Red Pitaya SDR -- -- ###################################################### -- # Gnuradio disabled components -- ###################################################### -- * Osmocom IQ Imbalance Correction -- * FUNcube Dongle -- * Osmocom RTLSDR -- * Ettus USRP Devices -- * Osmocom MiriSDR -- * HackRF & rad1o Badge -- * nuand bladeRF -- * AIRSPY Receiver -- * AIRSPY HF+ Receiver -- * SoapySDR support -- * FreeSRP support -- * XTRX SDR -- -- Building for version: 0.2.0.0 / 0.2.0 -- Using install prefix: /usr/local -- Configuring done -- Generating done -- Build files have been written to: /home/do/Desktop/gr-osmosdr/build make log build$ make Scanning dependencies of target gnuradio-osmosdr [ 3%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/source_impl.cc.o [ 6%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/sink_impl.cc.o [ 10%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/ranges.cc.o [ 13%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/device.cc.o [ 16%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/time_spec.cc.o [ 20%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/file/file_source_c.cc.o [ 23%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/file/file_sink_c.cc.o [ 26%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/rtl_tcp/rtl_tcp_source_c.cc.o [ 30%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/rfspace/rfspace_source_c.cc.o [ 33%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/redpitaya/redpitaya_source_c.cc.o [ 36%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/redpitaya/redpitaya_sink_c.cc.o [ 40%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/redpitaya/redpitaya_common.cc.o [ 43%] Linking CXX shared library libgnuradio-osmosdr.so [ 43%] Built target gnuradio-osmosdr Scanning dependencies of target pygen_python_39d4e67de739ed30daa9e90b81d19ba8 [ 46%] Generating __init__.pyc [ 50%] Generating __init__.pyo [ 50%] Built target pygen_python_39d4e67de739ed30daa9e90b81d19ba8 Scanning dependencies of target osmosdr_docstrings [ 53%] Copying osmosdr docstring templates as pybind headers ... copy docstrings to /home/do/Desktop/gr-osmosdr/build/python/bindings/source_pydoc.h copy docstrings to /home/do/Desktop/gr-osmosdr/build/python/bindings/sink_pydoc.h [ 53%] Built target osmosdr_docstrings Scanning dependencies of target osmosdr_python [ 56%] Building CXX object python/bindings/CMakeFiles/osmosdr_python.dir/device_python.cc.o [ 60%] Building CXX object python/bindings/CMakeFiles/osmosdr_python.dir/sink_python.cc.o [ 63%] Building CXX object python/bindings/CMakeFiles/osmosdr_python.dir/source_python.cc.o [ 66%] Building CXX object python/bindings/CMakeFiles/osmosdr_python.dir/ranges_python.cc.o [ 70%] Building CXX object python/bindings/CMakeFiles/osmosdr_python.dir/time_spec_python.cc.o [ 73%] Building CXX object python/bindings/CMakeFiles/osmosdr_python.dir/python_bindings.cc.o [ 76%] Linking CXX shared module osmosdr_python.cpython-38-x86_64-linux-gnu.so [ 76%] Built target osmosdr_python Scanning dependencies of target osmosdr_grc_yaml_blocks [ 80%] Generating rtlsdr_source.block.yml [ 83%] Generating osmosdr_source.block.yml [ 86%] Generating osmosdr_sink.block.yml [ 86%] Built target osmosdr_grc_yaml_blocks Scanning dependencies of target pygen_apps_03ea08eaf2eabbb417128930ee24e1f0 [ 90%] Shebangin osmocom_fft [ 93%] Shebangin osmocom_siggen_nogui [ 93%] Built target pygen_apps_03ea08eaf2eabbb417128930ee24e1f0 Scanning dependencies of target pygen_apps_3655506ca80e66922c09a15cdba12053 [ 96%] Generating osmocom_siggen_base.pyc [100%] Generating osmocom_siggen_base.pyo [100%] Built target pygen_apps_3655506ca80e66922c09a15cdba12053 do@ubuntu:~/Desktop/gr-osmosdr/build$ 安装log ....../gr-osmosdr/build$ sudo make install [ 43%] Built target gnuradio-osmosdr [ 50%] Built target pygen_python_39d4e67de739ed30daa9e90b81d19ba8 [ 53%] Built target osmosdr_docstrings [ 76%] Built target osmosdr_python [ 86%] Built target osmosdr_grc_yaml_blocks [ 93%] Built target pygen_apps_03ea08eaf2eabbb417128930ee24e1f0 [100%] Built target pygen_apps_3655506ca80e66922c09a15cdba12053 Install the project... -- Install configuration: "Release" -- Installing: /usr/local/include/osmosdr/api.h -- Installing: /usr/local/include/osmosdr/pimpl.h -- Installing: /usr/local/include/osmosdr/ranges.h -- Installing: /usr/local/include/osmosdr/time_spec.h -- Installing: /usr/local/include/osmosdr/device.h -- Installing: /usr/local/include/osmosdr/source.h -- Installing: /usr/local/include/osmosdr/sink.h -- Installing: /usr/local/lib/x86_64-linux-gnu/libgnuradio-osmosdr.so.0.2.0.0 -- Installing: /usr/local/lib/x86_64-linux-gnu/libgnuradio-osmosdr.so.0.2.0 -- Installing: /usr/local/lib/x86_64-linux-gnu/libgnuradio-osmosdr.so -- Installing: /usr/local/lib/cmake/osmosdr/gnuradio-osmosdrTargets.cmake -- Installing: /usr/local/lib/cmake/osmosdr/gnuradio-osmosdrTargets-release.cmake -- Installing: /usr/local/lib/cmake/osmosdr/gnuradio-osmosdrConfig.cmake -- Installing: /usr/local/lib/python3.8/dist-packages/osmosdr/__init__.py -- Installing: /usr/local/lib/python3.8/dist-packages/osmosdr/__init__.pyc -- Installing: /usr/local/lib/python3.8/dist-packages/osmosdr/__init__.pyo -- Installing: /usr/local/lib/python3.8/dist-packages/osmosdr/osmosdr_python.cpython-38-x86_64-linux-gnu.so -- Set runtime path of "/usr/local/lib/python3.8/dist-packages/osmosdr/osmosdr_python.cpython-38-x86_64-linux-gnu.so" to "" -- Installing: /usr/local/share/gnuradio/grc/blocks/rtlsdr_source.block.yml -- Installing: /usr/local/share/gnuradio/grc/blocks/osmosdr_source.block.yml -- Installing: /usr/local/share/gnuradio/grc/blocks/osmosdr_sink.block.yml -- Installing: /usr/local/lib/python3.8/dist-packages/osmosdr/osmocom_siggen_base.py -- Installing: /usr/local/lib/python3.8/dist-packages/osmosdr/osmocom_siggen_base.pyc -- Installing: /usr/local/lib/python3.8/dist-packages/osmosdr/osmocom_siggen_base.pyo -- Installing: /usr/local/bin/osmocom_fft -- Installing: /usr/local/bin/osmocom_siggen_nogui ......:~/Desktop/gr-osmosdr/build$ 最后运行 sudo ldconfig

然后启动gnuradio 搜索RTL 就出现了OsmoSDR下的RTL-SDR source了

安装RTL-SDR,支持rtl_test等命令 sudo apt install rtl-sdr ......~$ rtl_test -t Found 1 device(s): 0: Realtek, RTL2838UHIDIR, SN: 00000001 Using device 0: Generic RTL2832U OEM Detached kernel driver Found Rafael Micro R820T tuner Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 [R82XX] PLL not locked! Sampling at 2048000 S/s. No E4000 tuner found, aborting. Reattached kernel driver


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3